home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / tvtool2.zip / TVSCROLL.INT < prev    next >
Text File  |  1993-07-20  |  4KB  |  135 lines

  1. Unit TvScroll;
  2. {$B+}
  3. {$X+}
  4. {$V-}
  5.  
  6. {$I TVDEFS.INC}
  7.  
  8. INTERFACE
  9.  
  10.  
  11. USES
  12.   TvConst, TvViews,
  13.   Objects, Dialogs, Drivers, Views;
  14.  
  15.  
  16. CONST
  17.   gfScrollXY  = $80;
  18.   scVScroll   = ofVScrollBar;
  19.   scHScroll   = ofHScrollBar;
  20.  
  21.   CScrollInputLine  = #1#6#7#1; { Passive, Active, Selected, Arrow }
  22.  
  23.  
  24. TYPE
  25.   PbxScrollGroup = ^TbxScrollGroup;
  26.   TbxScrollGroup = Object(TGroup)
  27.     VScrollBar  : PScrollBar;
  28.     HScrollBar  : PScrollBar;
  29.     OldPos      : TPoint;
  30.     AutoPos     : Boolean;
  31.  
  32.     Constructor Init(var Bounds      : TRect;
  33.                          AHScrollBar : PScrollBar;
  34.                          AVScrollBar : PScrollBar);
  35.     Constructor Load(var S: TStream);
  36.     Procedure   HandleEvent(var Event : TEvent);          Virtual;
  37.     Procedure   Store(var S: TStream);
  38.   end;
  39.  
  40.  
  41.   PbxScrollDialog = ^TbxScrollDialog;
  42.   TbxScrollDialog = Object(TDialog)
  43.     Limit     : TPoint;
  44.     VScrollBar: PScrollBar;
  45.     HScrollBar: PScrollBar;
  46.     Interior  : PbxScrollGroup;
  47.  
  48.     Constructor Init(var Bounds : TRect;
  49.                          ATitle : String;
  50.                          ofFlag : Word);
  51.     Constructor Load(var S: TStream);
  52.     Procedure   AutoPosition(Enable : Boolean);
  53.     Function    InitBackground: PView;                    Virtual;
  54.     Procedure   InsertToScroll(P : PView);
  55.     Procedure   SetLimit(X, Y : Integer);
  56.     Procedure   Store(var S: TStream);
  57.   end;
  58.  
  59.  
  60.   PbxScrollView = ^TbxScrollView;
  61.   TbxScrollView = Object(TView)
  62.     Constructor Init(var Bounds : TRect);
  63.     Procedure   HandleEvent(var Event : TEvent);          Virtual;
  64.     Procedure   SetState(AState: Word;
  65.                          Enable: Boolean);                Virtual;
  66.   end;
  67.  
  68.  
  69.   PbxScrollInputLine  = ^TbxScrollInputLine;
  70.   TbxScrollInputLine  = Object(TInputLine)
  71.     Function    GetPalette: PPalette;                     Virtual;
  72.   end;
  73.  
  74.  
  75.   PbxScrollWindow = ^TbxScrollWindow;
  76.   TbxScrollWindow = Object(TbxWindow)
  77.     Limit      : TPoint;
  78.     VScrollBar : PScrollBar;
  79.     HScrollBar : PScrollBar;
  80.     Interior   : PbxScrollGroup;
  81.  
  82.     Constructor Init(var Bounds : TRect;
  83.                          ATitle : String;
  84.                          ANumber: Word;
  85.                          ofFlag : Word);
  86.     Constructor Load(var S: TStream);
  87.     Procedure   AutoPosition(Enable : Boolean);
  88.     Procedure   ChangeBounds(var Bounds : TRect);         Virtual;
  89.     Function    InitBackground: PView;                    Virtual;
  90.     Procedure   InsertToScroll(P : PView);
  91.     Procedure   SetLimit(X, Y : Integer);
  92.     Procedure   Store(var S: TStream);
  93.   end;
  94.  
  95.  
  96. { TVScroll registration procedure }
  97.  
  98. Procedure RegisterTVScroll;
  99.  
  100.  
  101. { Stream Registration Records }
  102.  
  103. CONST
  104.   RbxScrollGroup: TStreamRec = (
  105.     ObjType : 5350;
  106.     VmtLink : Ofs(TypeOf(TbxScrollGroup)^);
  107.     Load    : @TbxScrollGroup.Load;
  108.     Store   : @TbxScrollGroup.Store
  109.   );
  110.  
  111. CONST
  112.   RbxScrollDialog: TStreamRec = (
  113.     ObjType : 5351;
  114.     VmtLink : Ofs(TypeOf(TbxScrollDialog)^);
  115.     Load    : @TbxScrollDialog.Load;
  116.     Store   : @TbxScrollDialog.Store
  117.   );
  118.  
  119. CONST
  120.   RbxScrollInputLine: TStreamRec = (
  121.     ObjType : 5352;
  122.     VmtLink : Ofs(TypeOf(TbxScrollInputLine)^);
  123.     Load    : @TbxScrollInputLine.Load;
  124.     Store   : @TbxScrollInputLine.Store
  125.   );
  126.  
  127. CONST
  128.   RbxScrollWindow: TStreamRec = (
  129.     ObjType : 5353;
  130.     VmtLink : Ofs(TypeOf(TbxScrollWindow)^);
  131.     Load    : @TbxScrollWindow.Load;
  132.     Store   : @TbxScrollWindow.Store
  133.   );
  134.  
  135.